<template>
  <svg-icon icon-class="fullscreen" @click="fullScreen" />
</template>

<script>
import screenfull from "screenfull";
export default {
  methods: {
    fullScreen() {
      // 判断是否可全屏
      if (screenfull.isEnabled) {
        screenfull.request();
      } else {
        // 不支持
        this.$message.warning("当前浏览器不支持全屏");
      }
    },
  },
};
</script>

<style>
</style>